import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)

const state = {
        areaCode:{
                area_Code: 1,
                school_Name: '西安科技大学'
        },
        creator:'' // 用户id
}
const actions = {}
const mutations = {
        storageCode(state, areaCode) {
                state.areaCode = areaCode;
        },
        storageCreateId(state, creator) {
                state.creator = creator
        }
}
const getters = {}
export default new Vuex.Store({
        state,
        actions,
        mutations,
        getters,
        plugins: [createPersistedState()]
})